package com.test.learnaidl.utils;

import android.widget.Toast;

import com.test.learnaidl.app.App;


public class ToastUtils {
    private static Toast sToast;

    public static void show(String text) {
        sToastCancel();
        sToast = Toast.makeText(App.sContext, text, Toast.LENGTH_SHORT);
        sToast.show();
    }


    private static final void sToastCancel() {
        if (sToast != null) {
            sToast.cancel();
            sToast = null;
        }
    }

}
